package com.jinlia.show.modules.base.model.po;

import com.jinlia.show.modules.base.system.entity.GoodsLabel;
import com.jinlia.show.modules.base.system.entity.GoodsLabelRel;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class GoodsLabelPO extends GoodsLabel {
    List<GoodsLabelRel> goodsTagRelList;

    List<GoodsPO> goodsPOList;


    public static GoodsLabelPO fromEntity(GoodsLabel entity) {
        GoodsLabelPO vo = new GoodsLabelPO();
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }

    public static GoodsLabel toEntity(GoodsLabelPO vo) {
        GoodsLabel entity = new GoodsLabel();
        BeanUtils.copyProperties(vo, entity);
        return entity;
    }
}
